package com.spzx.test1.t1;
/*
    并非全力
*/

public class Test2 {
    public static void main(String[] args) throws InterruptedException {
        System.out.println(Thread.currentThread().getName()+"开始运行");

        Thread t1 =  new Thread(()->{
            System.out.println(Thread.currentThread().getName()+"开始运行");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println(Thread.currentThread().getName()+"运行结束");
        });
//        Thread.sleep(2000);
        t1.start();
        t1.join();

        System.out.println(Thread.currentThread().getName()+"运行结束");
    }
}
